#include<func.h>
int main(int argc,char*argv[])
{
    //./homework09 file1 file2
    //把所有的输出内容输出到两个文件里面
    //重定向stdout 和 stderr
    ARGS_CHECK(argc,3);
    close(STDOUT_FILENO);//关闭stdout
    close(STDERR_FILENO);//关闭stderr
    int oldfd = open(argv[1],O_RDWR|O_CREAT|O_TRUNC,0666);//可读可写 //1
    int newfd = open(argv[2],O_RDWR|O_CREAT|O_TRUNC,0666);//可读可写 //2
    printf("Hello\n");
    fprintf(stderr,"world\n");
    return 0;
}
